#!/bin/bash
#set -e
  #wget https://gitee.com/xiaoh5001/klipperocto4a/raw/master/scripts/app.py  -O /home/print3D/moonraker/moonraker/app.py
  sed -i  's/command -v apt/command -v apk/' /home/print3D/moonraker/moonraker/components/update_manager/update_manager.py
  sed -i  's/apt-cache search --names-only/ apk add /' /home/print3D/moonraker/moonraker/components/update_manager/update_manager.py
  sed -i  's/apt list --upgradable/ apk search --update /' /home/print3D/moonraker/moonraker/components/update_manager/update_manager.py
  sed -i  's/install --yest/add/' /home/print3D/moonraker/moonraker/components/update_manager/update_manager.py
  sed -i  's/upgrade --yes/upgrade/' /home/print3D/moonraker/moonraker/components/update_manager/update_manager.py
  sed -i  's/max_dbs=MAX_NAMESPACES)/max_dbs=MAX_NAMESPACES, lock=False)/'  /home/print3D/moonraker/moonraker/components/database.py
  sed -i "s/self.full_access_roots.clear()/self.full_access_roots/" /home/print3D/moonraker/moonraker/components/file_manager/file_manager.py